package com.example.springstudy.dao.dbo;

import com.example.springstudy.entity.Dept;
import lombok.Data;

import java.util.List;

@Data
public class DeptDbo {
    private Integer id;
    private Integer parentId;
    private Integer level;
    private String name;
    private String code;
    private String remark;

    private List<DeptDbo> children;

    public DeptDbo(Dept dept) {
        this.id = dept.getId();
        this.parentId = dept.getParentId();
        this.code = dept.getCode();
        this.name = dept.getName();
        this.remark = dept.getRemark();
        this.level = dept.getLevel();
    }
}
